﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMS.DAL.Providers;

namespace SMS.Business.Customer
{
    public class CustomerBussiness:BusinessBase<SMS.DAL.Customer,SMS.DAL.Providers.CustomerSearchCriteria>
    {
        SMS.DAL.Providers.CustomerProvider CustProvider;
        public CustomerBussiness()
        {
            CustProvider = new DAL.Providers.CustomerProvider();
        }
        public override bool Insert(DAL.Customer item)
        {
            CustProvider.Insert(item);
            return true;
        }

        public override bool Update(DAL.Customer updatedItem)
        {
            CustProvider.Update(updatedItem);
            return true;
        }

        public override bool Delete(int id)
        {
            CustProvider.Delete(id);
            return true;
        }

        public override DAL.Customer GetByID(int id)
        {
            return CustProvider.GetByID(id);
        }

        public override List<DAL.Customer> Search(DAL.Providers.CustomerSearchCriteria SearchCriteria)
        {
            return CustProvider.Search(SearchCriteria);
        }

        public List<DAL.Customer> GetAll()
        {
            return CustProvider.GetAll();
        }
    }
}
